package br.great.functionalCore.Adress;

import br.great.beans.Address;
import br.great.beans.Point;

/**
* PhotoMap
* Copyright (c) 2007-2008 STEAMER - LIG, All rights reserved.
*/

/**
 * @author Developpement of PhotoMap
 */
public class AddressServiceDelegate {

/** method description
* @param var signification
* @exception exception class name
* @return return_value return signification
* @see package.class#member label
*/
    protected AddressService addressService;
    public AddressServiceDelegate(){
        this.addressService = new GeonamesAddressService();
      //  this.addressService = new FranceAddressService();
    }

    public Address getAddressByCoordinates(Point point){
        try{
        return this.addressService.getAddressByCoordinates(point);
        } catch (NullPointerException ex) {
            return null;
        }
    }
}
